<template>
  <div class="propertys">
     <!-- 顶部搜索区域 -->
    <el-card>
      <el-form v-model="searchDate" ref="searchRef" label-width="100px" class="demo-ruleForm">
        <el-row class="demo-ruleForm-row">
          <el-col :span="6">
            <el-form-item label="分标项目名称" prop="subcontracted">
              <el-input placeholder="请输入分标项目名称" v-model="searchDate.subcontracted" clearable></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="参投单位" prop="company_name">
              <el-input placeholder="请输入参投单位" v-model="searchDate.company_name" clearable></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="包名称" prop="package_name">
              <el-input placeholder="请输入包名称" v-model="searchDate.package_name" clearable></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" >
            <div class="search_col">
              <el-button type="primary" size="mini" icon="el-icon-search">搜索</el-button>
              <el-button type="primary" size="mini" icon="el-icon-refresh" @click="resetForm">重置</el-button>
            </div>
          </el-col>
        </el-row>
      </el-form>
    </el-card>
    
     <el-table :data="propertysData"
      style="width: 100%" border>
        <!-- <el-table-column
          type="selection"
          width="55">
        </el-table-column> -->
        <el-table-column label="序号" width="75" type="index"></el-table-column>
        <el-table-column prop="name" label="招标项目名称" width="240"></el-table-column>
        <el-table-column prop="subcontract" label="分包编号"> </el-table-column>
        <el-table-column prop="" label="包名称（部位）"></el-table-column>
        <el-table-column prop="subcontracted" label="分标项目名称"> </el-table-column>
        <el-table-column prop="company_name" label="参投单位" width="120"> </el-table-column>
        <el-table-column prop="offer" label="最终报价(万元)" width="120"> </el-table-column>
        <el-table-column prop="approve" label="最终折扣" width="120"> </el-table-column>
        <el-table-column prop="prize" label="是否中标" width="120"> </el-table-column>
        <el-table-column prop="winning" label="中标金额(万元)"> </el-table-column>
        <el-table-column prop="server" label="应收中标服务费(元)" width="120"> </el-table-column>
         <el-table-column prop="servers" label="实收收中标服务费(元)" width="120"> </el-table-column>
        <el-table-column prop="price" label="应收保证金（标书规定缴纳金额）(元)"> </el-table-column>
        <el-table-column prop="ensure" label="实收保证金(元)"> </el-table-column>
        <el-table-column label="操作" width="150">
          <template slot-scope="scope">
            <el-row>
              <el-button type="primary" size="mini" @click="serviceDialogVisible = true">服务费到账情况</el-button>
            </el-row>
            <el-row class="submit_row">
              <el-button type="primary" size="mini" @click="marginDialogVisible = true">保证金到账情况</el-button>
            </el-row>
            
            <!-- <el-row>
              <el-button type="primary" size="mini">未收服务费</el-button>
              <el-button size="mini">已收服务费</el-button>
            </el-row>
            <el-row class="submit_row">
              <el-button type="primary" size="mini">未收保证金</el-button>
              <el-button size="mini">已收保证金</el-button>
            </el-row> -->
          </template>
        </el-table-column>
      </el-table>

      <!-- 服务费到账情况 -->
      <el-dialog
        title="服务费到账情况"
        :visible.sync="serviceDialogVisible"
        width="35%">
          <div>
            <el-radio-group v-model="radio1" size="mini" @change="change1">
              <el-radio label="1">未收服务费</el-radio>
              <el-radio label="2">已收服务费</el-radio>
            </el-radio-group>
          </div>
        <span slot="footer" class="dialog-footer">
          <el-button @click="serviceDialogVisible = false">取 消</el-button>
          <el-button type="primary" @click="serviceDialogVisible = false">确 定</el-button>
        </span>
      </el-dialog>

      <!-- 保证金到账情况 -->
      <el-dialog
        title="保证金到账情况"
        :visible.sync="marginDialogVisible"
        width="35%">
        <div>
          <el-radio-group v-model="radio2" size="mini" @change="change2">
            <el-radio label="3">未收保证金</el-radio>
            <el-radio label="4">已收保证金</el-radio>
          </el-radio-group>
        </div>
        <span slot="footer" class="dialog-footer">
          <el-button @click="marginDialogVisible = false">取 消</el-button>
          <el-button type="primary" @click="marginDialogVisible = false">确 定</el-button>
        </span>
      </el-dialog>
  </div>
</template>

<script>
export default {
  data () {
    return {
      // 搜索数据
      searchDate: {
        company_name: '',
        package_name: '',
        subcontracted: '',
      },

      // 表格数据
      propertysData: [
         {
          name: '国网江西省电力有限公司上饶供电分公司集体企业2020年第002批物资类招标',
          subcontract: 'JXRY2020-SR-002-JT(WZ)-101',
          package_name: '',
          subcontracted: '铁塔',
          company_name: '江西固德实业有限公司',
          offer: 346.368,
          approve:9.5,
          prize: '是',
          winning: '/',
          server: '/',
          servers: '/',
          ensure: 4000,
          price: 4000
        }
      ],

      
      // 控制服务费到账情况弹框的显示与隐藏
      serviceDialogVisible: false,
      // 服务费到账情况
      radio1: '1',
      // 控制保证金到账情况弹框的显示与隐藏
      marginDialogVisible: false,
      // 保证金到账情况
      radio2: '3',
    }
  },
  methods: {
     // 重置事件
    resetForm() {
      this.searchDate.company_name = '',
      this.searchDate.package_name = '',
      this.searchDate.subcontracted = ''
    },

    change1(val) {
      console.log(val);
    },
    change2(val) {
      console.log(val);
    }
  }
}
</script>

<style scoped>
.propertys {
  padding-left: 20px;
}

.submit_row {
  margin-top: 10px;
}
</style>